package com.haina.shop.mapper;

import com.haina.shop.domain.OrderItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 48077
* @description 针对表【tz_order_item(订单项)】的数据库操作Mapper
* @createDate 2024-07-31 18:34:29
* @Entity com.haina.shop.domain.OrderItem
*/
public interface OrderItemMapper extends BaseMapper<OrderItem> {
    /**
     * 根据order_num查询订单商品项
     * @param orderNumber
     * @return
     */
    @Select("select * from yami_shops.tz_order_item where order_number=#{orderNum} and user_id=#{userId}" )
    List<OrderItem> selectListByOrderNum(@Param("orderNum") String orderNumber,
                                         @Param("userId") Long userId);
     @Select("select * from yami_shops.tz_order_item where order_number=#{order_num}")
    List<OrderItem> getByOrderNum(String orderNumber);
}




